import { RouteConfig } from "vue-router";
import Layout from "@/layout/index.vue";

const desktopManage: RouteConfig = {
  path: "/desktopManage",
  component: Layout,
  redirect: "/desktopManage/HorizonDesktopPools",
  name: "DesktopManage",
  meta: {
    title: "desktopManage",
    icon: "iconfont icon-userstoryicon",
    routerRuleName: "DesktopManage"
  },
  children: [
    {
      path: "HorizonDesktopPools",
      component: () => import("@/views/desktopManage/system_manage/horizonDesktopPool/horizonDesktopPool.vue"),
      name: "HorizonDesktopPools",
      meta: {
        title: "HorizonDesktopPools",
        noCache: true,
        type: "/desktopManage/HorizonDesktopPools", /**type用于页面左侧菜单的路由active效果判断 */
        authrole: 'system_admin',
        multiLayer: true,
        routerRuleName: "HorizonDesktopPools"
      }
    },
    {
      path: "DaaSDesktopPools",
      component: () => import("@/views/desktopManage/system_manage/daasDesktopPool/daasDesktopPool.vue"),
      name: "DaaSDesktopPools",
      meta: {
        title: "DaaSDesktopPools",
        noCache: true,
        type: "/desktopManage/DaaSDesktopPools",
        authrole: 'system_admin',
        multiLayer: true,
        routerRuleName: "DaaSDesktopPools"
      }
    },
    {
      path: "DaaSDesktopPoolDetail",
      component: () => import("@/views/desktopManage/system_manage/daasDesktopPool/daasPoolDetail.vue"),
      name: "DaaSDesktopPoolDetail",
      meta: {
        title: "DaaSDesktopPoolDetail",
        noCache: true,
        hidden: true,
        type: "/desktopManage/DaaSDesktopPools"
      }
    },
    {
      path: "SearchDesktops",
      component: () => import("@/views/desktopManage/system_manage/searchDesktops.vue"),
      name: "SearchDesktops",
      meta: {
        title: "searchDesktops",
        noCache: true,
        // type: "/desktopManage/DaaSDesktopPools", /**type用于页面左侧菜单的路由active效果判断 */
        hidden: true
      }
    },
    {
      path: "HorizonDesktopPoolDetail",
      component: () => import("@/views/desktopManage/system_manage/horizonDesktopPool/horizonPoolDetail.vue"),
      name: "HorizonDesktopPoolDetail",
      meta: {
        title: "HorizonDesktopPoolDetail",
        noCache: true,
        hidden: true,
        type: "/desktopManage/HorizonDesktopPools"
      }
    },
    {
      path: "DesktopPools",
      component: () => import("@/views/desktopManage/tenant_manage/desktopPool.vue"),
      name: "DesktopPools",
      meta: {
        title: "desktopManage", // 租户管理员路由
        noCache: true,
        type: "/desktopManage/DesktopPools",
        authrole: 'tenant_admin'
      }
    },
    {
      path: "TenantHorizonDesktopPoolDetail",
      component: () => import("@/views/desktopManage/system_manage/horizonDesktopPool/horizonPoolDetail.vue"),
      name: "TenantHorizonDesktopPoolDetail",
      meta: {
        title: "TenantHorizonDesktopPoolDetail",
        noCache: true,
        hidden: true,
        type: "/desktopManage/DesktopPools"
      }
    },
    {
      path: "TenantDaaSDesktopPoolDetail",
      component: () => import("@/views/desktopManage/system_manage/daasDesktopPool/daasPoolDetail.vue"),
      name: "TenantDaaSDesktopPoolDetail",
      meta: {
        title: "TenantDaaSDesktopPoolDetail",
        noCache: true,
        hidden: true,
        type: "/desktopManage/DesktopPools"
      }
    }
  ]
};

export default desktopManage;
